import Vue from 'vue'
import Vuex from 'vuex'
import address from './modules/address'
import shopcart from './modules/shopcart'
import user from './modules/user'
import product from './modules/product'
import invoice from './modules/invoice'
import examine from './modules/examine'
import actions from './actions'
import mutations from './mutations'

Vue.use(Vuex)

const state = {
  unreceived: false, // 未领取的券
  productList: null, // 所有商品信息
  secondList: null, // 二级商品目录信息
  hiddenSearch: false, // 是否显示搜索框
  shopcartHide: false, // 是否隐藏搜索框上的购物车
  levelInfoObj: {}, // 会员等级信息
  levelVOS: [] // 会员等级具体值
}

export default new Vuex.Store({
  state,
  actions,
  mutations,
  modules: {
    address,
    shopcart,
    user,
    product,
    invoice,
    examine
  }
})
